import { CommandAdapt } from "./CommandAdapt";

// 通过CommandAdapt中转避免直接暴露编辑器上下文

export class Command {
  // 上一个幻灯片
  public executePrevSlide: CommandAdapt["prevSlide"];
  // 下一个幻灯片
  public executeNextSlide: CommandAdapt["nextSlide"];
  // 切换至指定幻灯片
  public executeSwitchSlide: CommandAdapt["switchSlide"];
  // 添加新幻灯片
  public executeAddSlide: CommandAdapt["addSlide"];
  // 获取 幻灯片缩略图
  public getSlideImage: CommandAdapt["getSlideImage"];
  // 从头放映
  public executePreviewBeginning: CommandAdapt["previewBeginning"];
  // 从当前放映
  public executePreviewCurrent: CommandAdapt["previewCurrent"];
  // 预览指定幻灯片
  public executePreviewSlide: CommandAdapt["previewSlide"];
  // 屏幕录制
  public executeRecord: CommandAdapt["record"];
  // 添加网格 - 应该是通过统一的背景设置进行处理
  public executeSetBackground: CommandAdapt["setBackground"];
  // 删除幻灯片
  public executeDeleteSlide: CommandAdapt["deleteSlide"];
  // 重命名
  public executeRename: CommandAdapt["rename"];
  //  导入PPTX
  public executeImportPptx: CommandAdapt["importPptx"];
  // 导出 PPTX
  public executeExportPptx: CommandAdapt["exportPptx"];
  // 另存为 PDF
  public executeExportPdf: CommandAdapt["exportPdf"];
  // 导出为 图片
  public executeExportImage: CommandAdapt["exportImage"];
  // 分享发送
  public executeShare: CommandAdapt["share"];
  // 文档加密
  public executeEncrypt: CommandAdapt["encrypt"];
  // 打印
  public executePrint: CommandAdapt["print"];
  // 显示帮助 - 快捷键操作/常见问题/意见反馈（通过参数实现显示不同的内容）
  public executeHelp: CommandAdapt["help"];
  // 保存
  public executeSave: CommandAdapt["save"];
  // 撤销
  public executeUndo: CommandAdapt["undo"];
  // 重做
  public executeRedo: CommandAdapt["redo"];
  //  剪切
  public executeCut: CommandAdapt["cut"];
  //  复制
  public executeCopy: CommandAdapt["copy"];
  //  粘贴
  public executePaste: CommandAdapt["paste"];
  //  置于顶层
  public executeTop: CommandAdapt["top"];
  // 上移一层
  public executeHoldUp: CommandAdapt["holdup"];
  // 下移一层
  public executePutDown: CommandAdapt["putdown"];
  // 置于底层
  public executeBottom: CommandAdapt["bottom"];
  // 水平居左
  public executeHorizontLeft: CommandAdapt["horizontleft"];
  // 水平居中
  public executeHorizonCenter: CommandAdapt["horizoncenter"];
  //  水平居右
  public executeHorizonRight: CommandAdapt["horizonright"];
  //  垂直置顶
  public executeVerticalTop: CommandAdapt["verticaltop"];
  //  垂直居中
  public executeVerticalCenter: CommandAdapt["verticalcenter"];
  //  垂直置底
  public executeVerticalBottom: CommandAdapt["verticalbottom"];
  //  动画
  public executeAnimation: CommandAdapt["animation"];
  // 设置属性
  public executeOpenSetting: CommandAdapt["openSetting"];
  //  设置元素属性
  public executeUpdateShapeOptions: CommandAdapt["updateShapeOptions"];
  // 插入图片
  public executeInsertImage: CommandAdapt["insertImage"];
  // 插入音频
  public executeInsertMedia: CommandAdapt["insertMedia"];
  // 插入公式
  public executeInsertLatex: CommandAdapt["insertLatex"];
  // 插入表格
  public executeInsertTable: CommandAdapt["insertTable"];
  // 插入统计图
  public executeInsertChart: CommandAdapt["insertChart"];
  // 插入富文本
  public executeInsertRichText: CommandAdapt["insertRichText"];
  // 删除图形
  public executeDeleteGraph: CommandAdapt["deleteGraph"];
  // 移动元素
  public executeMoveGraph: CommandAdapt["moveGraph"];
  // 全选
  public executeSelectAll: CommandAdapt["selectAll"];
  // Uni Theme 主题
  public setTheme: CommandAdapt["setTheme"];
  // 智能美化
  public executeBeautify: CommandAdapt["beautify"];
  // 打开幻灯片模板
  public executeOpenSlideTemp: CommandAdapt["openSlideTemp"];
  // 打开消息中心
  public executeOpenMessage: CommandAdapt["openMessage"];
  // 更新Line 配置项
  public executeUpdateLineOptions: CommandAdapt["updateLineOptions"];

  constructor(adapt: CommandAdapt) {
    this.executePrevSlide = adapt.prevSlide.bind(adapt);

    this.executeNextSlide = adapt.nextSlide.bind(adapt);

    this.executeSwitchSlide = adapt.switchSlide.bind(adapt);

    this.executePreviewBeginning = adapt.previewBeginning.bind(adapt);

    this.executePreviewCurrent = adapt.previewCurrent.bind(adapt);

    this.executePreviewSlide = adapt.previewSlide.bind(adapt);

    this.executeRecord = adapt.record.bind(adapt);

    this.executeAddSlide = adapt.addSlide.bind(adapt);

    this.getSlideImage = adapt.getSlideImage.bind(adapt);

    this.executeImportPptx = adapt.importPptx.bind(adapt);

    this.executeExportPptx = adapt.exportPptx.bind(adapt);

    this.executeExportPdf = adapt.exportPdf.bind(adapt);

    this.executeExportImage = adapt.exportImage.bind(adapt);

    this.executeShare = adapt.share.bind(adapt);

    this.executeEncrypt = adapt.encrypt.bind(adapt);

    this.executePrint = adapt.print.bind(adapt);

    this.executeHelp = adapt.help.bind(adapt);

    this.executeSave = adapt.save.bind(adapt);

    this.executeUndo = adapt.undo.bind(adapt);

    this.executeRedo = adapt.redo.bind(adapt);

    this.executeCut = adapt.cut.bind(adapt);

    this.executeCopy = adapt.copy.bind(adapt);

    this.executePaste = adapt.paste.bind(adapt);

    this.executeTop = adapt.top.bind(adapt);

    this.executeHoldUp = adapt.holdup.bind(adapt);

    this.executePutDown = adapt.putdown.bind(adapt);

    this.executeBottom = adapt.bottom.bind(adapt);

    this.executeHorizontLeft = adapt.horizontleft.bind(adapt);

    this.executeHorizonCenter = adapt.horizoncenter.bind(adapt);

    this.executeHorizonRight = adapt.horizonright.bind(adapt);

    this.executeVerticalTop = adapt.verticaltop.bind(adapt);

    this.executeVerticalCenter = adapt.verticalcenter.bind(adapt);

    this.executeVerticalBottom = adapt.verticalbottom.bind(adapt);

    this.executeAnimation = adapt.animation.bind(adapt);

    this.executeOpenSetting = adapt.openSetting.bind(adapt);

    this.executeRename = adapt.rename.bind(adapt);

    this.executeSetBackground = adapt.setBackground.bind(adapt);

    this.executeDeleteSlide = adapt.deleteSlide.bind(adapt);

    this.executeInsertImage = adapt.insertImage.bind(adapt);

    this.executeInsertMedia = adapt.insertMedia.bind(adapt);

    this.executeInsertLatex = adapt.insertLatex.bind(adapt);

    this.executeInsertTable = adapt.insertTable.bind(adapt);

    this.executeInsertChart = adapt.insertChart.bind(adapt);

    this.executeInsertRichText = adapt.insertRichText.bind(adapt);

    this.executeDeleteGraph = adapt.deleteGraph.bind(adapt);

    this.executeUpdateShapeOptions = adapt.updateShapeOptions.bind(adapt);

    this.executeMoveGraph = adapt.moveGraph.bind(adapt);

    this.executeSelectAll = adapt.selectAll.bind(adapt);

    this.setTheme = adapt.setTheme.bind(adapt);

    this.executeBeautify = adapt.beautify.bind(adapt);

    this.executeOpenSlideTemp = adapt.openSlideTemp.bind(adapt);

    this.executeOpenMessage = adapt.openMessage.bind(adapt);

    this.executeUpdateLineOptions = adapt.updateLineOptions.bind(adapt);
  }
}
